package com.example.reserveseat.Enums;

/**
 * 调用状态码
 */
public enum ReserveAreaEnum {


    /**
     * 沉浸1
     */
    CALM_ONE("1"),
    /**
     * 沉浸2
     */
    CALM_TWO("2"),
    /**
     * 休闲区
     */
    LEISURE("3");

    private final String value;

    ReserveAreaEnum(String value) {
        this.value = value;

    }

    public String getValue() {
        return value;
    }

    public static ReserveAreaEnum getEnumByType(String type) {
        for (ReserveAreaEnum item : ReserveAreaEnum.values()) {
            if (item.getValue().equals(type)) {
                return item;
            }
        }
        throw new RuntimeException("获取枚举类错误");
    }

}
